﻿@model music.web.Models.Shared.PlaylistModel
@{
	string tmpId = Guid.NewGuid().ToString("N");
	string playerId = "jquery_jplayer_" + tmpId;
	string controlContainerId = "jp_container_" + tmpId;
}

<script type="text/javascript">

	$(function () {
	
		var songs = @Html.Raw(Model.GetPlaylistJson(Url));

		initPlaylist("#@playerId", "#@controlContainerId", songs);

	});
</script>
<div>
	<div id="@playerId" class="jp-jplayer">
	</div>
	<div id="@controlContainerId" class="jp-audio">
		<div class="jp-type-playlist">
			<div class="jp-gui jp-interface">
				<ul class="jp-controls">
					<li><a href="javascript:;" class="jp-previous" tabindex="1">previous</a></li>
					<li><a href="javascript:;" class="jp-play" tabindex="1">play</a></li>
					<li><a href="javascript:;" class="jp-pause" tabindex="1">pause</a></li>
					<li><a href="javascript:;" class="jp-next" tabindex="1">next</a></li>
					<li><a href="javascript:;" class="jp-stop" tabindex="1">stop</a></li>
					<li><a href="javascript:;" class="jp-mute" tabindex="1" title="mute">mute</a></li>
					<li><a href="javascript:;" class="jp-unmute" tabindex="1" title="unmute">unmute</a></li>
					<li><a href="javascript:;" class="jp-volume-max" tabindex="1" title="max volume">max
							volume</a></li>
				</ul>
				<div class="jp-progress">
					<div class="jp-seek-bar">
						<div class="jp-play-bar">
						</div>
					</div>
				</div>
				<div class="jp-volume-bar">
					<div class="jp-volume-bar-value">
					</div>
				</div>
				<div class="jp-time-holder">
					<div class="jp-current-time">
					</div>
					<div class="jp-duration">
					</div>
				</div>
				<ul class="jp-toggles">
					<li><a href="javascript:;" class="jp-shuffle" tabindex="1" title="shuffle">shuffle</a></li>
					<li><a href="javascript:;" class="jp-shuffle-off" tabindex="1" title="shuffle off">shuffle
							off</a></li>
					<li><a href="javascript:;" class="jp-repeat" tabindex="1" title="repeat">repeat</a></li>
					<li><a href="javascript:;" class="jp-repeat-off" tabindex="1" title="repeat off">repeat
							off</a></li>
				</ul>
			</div>
			<div class="jp-playlist">
				<ul>
					<li></li>
				</ul>
			</div>
			<div class="jp-no-solution">
				<span>Update Required</span> To play the media you will need to either update your
				browser to a recent version or update your <a href="http://get.adobe.com/flashplayer/"
															  target="_blank">Flash plugin</a>.
			</div>
		</div>
	</div>
</div>
